package com.cloudkinto.service.orderinput;

import com.cloudkinto.entity.OrderInputDo;
import com.baomidou.mybatisplus.extension.service.IService;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.orderinput.vo.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author 张永远
 * @since 2020-06-08
 */
public interface OrderInputService extends IService<OrderInputDo> {

    SingleResult addInit(Long userId, Long companyId);

    OrderInputAddReq add(OrderInputAddReq req, Long userId,Long companyId);

    SingleResult<Map> updateInit(Long id, Long currentUserId, Long companyId);

    OrderInputUpdateReq update(OrderInputUpdateReq updateVo, Long userId);

    int delete(Long id, Long userId);

    OderInputDetailRes detail(Long id);

    List<InputMarkProduct> getProductList(Long id);

    SingleResult pageInit(Long userId, Long companyId);

    PageResult getListPage(Map<String, String> map);

    List<ExcelImportPackageRes> importExcel(MultipartFile file, Long companyId) throws IOException;

    String exportPackagePdf(Long id, int type, boolean showCountry, HttpServletResponse response);

    String exportProductCodePdf(Long id, HttpServletResponse response);

    SingleResult fbaReturnInit(Long id,Long userId,Long companyId);

    void handlerStockCount(OrderInputDo orderInputDo, Long userId);

    void exportExcel(List<Long> ids, Long companyId, HttpServletResponse response);

    Long openApiAdd(OrderInputOpenApiAddReq req, Long userId, Long companyId);

    Long openApiUpdate(OrderInputOpenApiUpdateReq req, Long userId);

    boolean openApiDelete(Long id, Long userId);

    void printBarCodePdf(Map<String, String> map, Long id, int length, int width, HttpServletResponse response);

    double getOrderInputUnitCost(Long orderId);

    Map<String, Long> batchMatchSkuId(OrderInputOpenApiMatchProductIdReq req, Long companyId);
}
